<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddExtractToTaskTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('recharge_task', function (Blueprint $table) {
            Schema::table('recharge_task', function (Blueprint $table) {
                $table->tinyInteger('recharge_mode')->default(1)->comment('充值方式1自动2手动');
                $table->string('handle_remark')->nullable()->comment('手动充值的备注信息');
                $table->index(['recharge_mode']);
            });
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('recharge_task', function (Blueprint $table) {
            $table->dropColumn(['recharge_mode','handle_remark']);
        });
    }
}
